#
# Cookbook Name:: was8.5
# Recipe:: create was user and group
#
# Copyright 2013, IBM Corporation
#
# All rights reserved - Do Not Redistribute
#

# Create was user and group

group "#{node[:was][:group]}" do
  action :create
end

user "#{node[:was][:user]}" do
  gid "#{node[:was][:group]}"
  action :create
end

bash "changepassword for non-root user" do
  user "root"
  code <<-EOH
  usermod -a -G users #{node[:was][:user]}
  echo "#{node[:was][:user]}:#{node[:was][:userpw]}" | /usr/sbin/chpasswd
  EOH
end
